package com.pc.tas.util;

import org.springframework.context.ApplicationContext;


public class SpringBeanUtil {
	private static ApplicationContext appCtx;
    public static Object getBean(String name) {
        try {  
            return appCtx.getBean(name);
        }
        catch (Exception e) {
            e.printStackTrace();
        }        
        return null;
    }
	public static void setAppCtx(ApplicationContext appCtx) {
		SpringBeanUtil.appCtx = appCtx;
	}
	
	public static ApplicationContext getAppCtx() {
	        return appCtx;
	}
}
